﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
	<!-- Resource dictionary entries should be defined here. -->
	<Style x:Key="ButtonCircleStyle" TargetType="{x:Type Button}">
		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Value="{DynamicResource ButtonCircleControlTemplate}" Property="Template"/>
	</Style>
	<ControlTemplate x:Key="ButtonCircleControlTemplate" TargetType="{x:Type Button}">
		<Grid Width="Auto" Height="Auto">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>
			<Rectangle Stroke="{x:Null}" x:Name="rectangle" VerticalAlignment="Stretch" Opacity="0">
				<Rectangle.Fill>
					<RadialGradientBrush GradientOrigin="0.462,0.545">
						<RadialGradientBrush.RelativeTransform>
							<TransformGroup>
								<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.066" ScaleY="1.066"/>
								<SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
								<RotateTransform Angle="139.286" CenterX="0.5" CenterY="0.5"/>
								<TranslateTransform X="0.066" Y="0"/>
							</TransformGroup>
						</RadialGradientBrush.RelativeTransform>
						<GradientStop Color="#FFC4DABC" Offset="0.522"/>
						<GradientStop Color="#00A7BAA0" Offset="1"/>
					</RadialGradientBrush>
				</Rectangle.Fill>
			</Rectangle>
			<ContentPresenter VerticalAlignment="Stretch" Height="100"/>
		</Grid>
		<ControlTemplate.Triggers>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter Property="Opacity" TargetName="rectangle" Value="1"/>
				<Setter Property="RadiusX" TargetName="rectangle" Value="21"/>
				<Setter Property="RadiusY" TargetName="rectangle" Value="21"/>
				<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource BrushButtonCircle}"/>
			</Trigger>
			<Trigger Property="IsPressed" Value="True"/>
			<Trigger Property="IsKeyboardFocused" Value="true"/>
			<Trigger Property="ToggleButton.IsChecked" Value="true"/>
			<Trigger Property="IsEnabled" Value="false">
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<Style x:Key="ButtonCircleSelectedStyle" TargetType="{x:Type Button}">
		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Value="{DynamicResource ButtonCircleSelectedControlTemplate}" Property="Template"/>
	</Style>
	<ControlTemplate x:Key="ButtonCircleSelectedControlTemplate" TargetType="{x:Type Button}">
		<Grid Width="Auto" Height="Auto">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>
			<Rectangle Stroke="{x:Null}" x:Name="rectangle" VerticalAlignment="Stretch" Opacity="1" Fill="{DynamicResource BrushButtonCircle}"/>
			<ContentPresenter VerticalAlignment="Stretch" Height="100"/>
		</Grid>
		<ControlTemplate.Triggers>
			<Trigger Property="IsPressed" Value="True"/>
			<Trigger Property="IsKeyboardFocused" Value="true"/>
			<Trigger Property="ToggleButton.IsChecked" Value="true"/>
			<Trigger Property="IsEnabled" Value="false">
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
</ResourceDictionary>